package com.fdc_project.vo;


import com.sun.org.apache.xpath.internal.operations.Bool;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class Result {
  /**
  * 成功信息
  * */
    private boolean success;
    /**
     *
     * */
    private int code;
    /**
     * 成功信息
     * */
    private String msg;
    /**
     * 成功信息
     * */
    private Object data;

    public static Result success(Object data){ return new Result(true, 200, "success", data); }

    public static Result fail(int code, String msg){
    return new Result(false, code, msg, null);
  }


}
